<?php 
/*
 module:		财务报告控制器
 create_time:	2024-02-20 11:34:19
 author:		
 contact:		
*/

namespace app\admin\validate;
use think\validate;

class Finance extends validate {


	protected $rule = [
		'name'=>['require'],
		'money'=>['regex'=>'/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/'],
		'mend_money'=>['regex'=>'/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/'],
	];

	protected $message = [
		'name.require'=>'客户姓名不能为空',
		'money.regex'=>'实收金额(RMB)格式错误',
		'mend_money.regex'=>'补款金额(RMB)格式错误',
	];

	protected $scene  = [
		'add'=>['name','money','mend_money'],
		'update'=>['name','money','mend_money'],
	];



}

